//package com.kolaxy.consumer;
//
//import org.aspectj.lang.ProceedingJoinPoint;
//import org.aspectj.lang.annotation.Around;
//import org.aspectj.lang.annotation.Aspect;
//
//@Aspect
//class TracingAspect {
//    @Around("execution (* feign.Client.*(..)) && !within(is(FinalType))")
//    public Object feignClientWasCalled(final ProceedingJoinPoint pjp) throws Throwable {
//        Object bean = pjp.getTarget();
//        if (!(bean instanceof TracingClient)) {
//            Object[] args = pjp.getArgs();
//            return new TracingClientBuilder((Client) bean, tracer)
//                    .withFeignSpanDecorators(spanDecorators)
//                    .build()
//                    .execute((Request) args[0], (Request.Options) args[1]);
//        }
//        return pjp.proceed();
//    }
//}